<script>
    $(".import_menue").remove();
</script>
<div class="main_banner">
    <div class="w1200">
        <div class='main_menu fl' id='GoodsMenuDiv' style='display:none'>
            <div class='main_menu_bg'></div>
            <ul class='meun_wrap'>
                <?php foreach($goodscat as $v1):?>
                <li>
                    <?php if($v1['parent_id']==0):?>
                    <dl class='parent_title'>
                        <dt>
                            <i class='<?=$v1["icon"]?>'></i>
                            <a href='/goods/lists?cat_id=<?=$v1["id"]?>'><?=$v1['cat_title']?></a>
                            <b class='icon'>></b>
                        </dt>
                        <dd><?=$v1['sub_title']?></dd>
                    </dl>
                    <?php endif;?>
                    <div class='child_node'>
                        <?php
                        foreach($goodscat as $v2):
                            if($v2['parent_id']==$v1['id']):
                        ?>
                        <dl class='child_dl'>
                            <dt><a href='/goods/lists?cat_id=<?=$v2["id"]?>'><?=$v2['cat_title']?></a></dt>
                            <dd>
                                <?php
                                    foreach($goodscat as $v3):
                                    if($v3['parent_id']==$v2['id']):
                                    ?>
                                <a href='/goods/lists?cat_id=<?=$v3["id"]?>'><?=$v3['cat_title']?></a>
                                <?php endif;endforeach;?>
                            </dd>
                        </dl>
                        <?php endif;endforeach;?>
                    </div>
                </li>
                <?php endforeach;?>
            </ul>
        </div>
        <!--新闻资讯公告-->
        <div class="main_ropo fr">
            <div class="new">

                <div class="title">
                    <?php echo isset($indexf['notice']['0'])?$indexf['notice']['0']['cat_title']:'';?>
                </div>
                <ul class="repo_top">
                    <?php foreach($indexf['notice'] as $k => $v):?>
                    <li><i></i><a href='/article/detail1?id=<?=$v['id']?>'><?=$v['title']?></a></li>
                    <?php endforeach;?>
                </ul>

            </div>
            <div class="advem"><img src="<?=$com['img']['right_down_img']['pic']?>"></div>
        </div>
        <div class="clear"></div>
        <!--新闻资讯公告-->
    </div>
    <div id="fade_banner" class="fade_banner">
        <ul class="fade_background">

        </ul>
        <div class="content" wrapper>
            <ul class="fade_move">
                <?php $slide = isset($indexf['slide']['6'])?$indexf['slide']['6']:[];foreach($slide as $k=>$val):?>
                <style>
                    .banner_Color<?php echo $k+1; ?>
                     {
                        background-color: <?=$val['background_color'] ?>;
                    }
                </style>
                <li style='background-color:<?=$val['background_color']?>;'>
                    <a href='<?=$val['url']?>'>
                    <img src='<?=$val['pic']?>'>
                    </a>
                </li>
                <?php endforeach;?>
            </ul>
            <ul class="fade_sort">
            </ul>
            <div class="fade_switch" style="display:none"><a href="javascript:;" class="btnLink left"><i></i></a><a
                    href="javascript:;" class="btnLink right"><i></i></a></div>
        </div>
    </div>
</div>
<div class="main_content w1200" id="round">
    <div class="main_plates">
        <ul>
        </ul>
    </div>
    <?php include_once __DIR__.'/../indexf/f1.html'?>
    <?php include_once __DIR__.'/../indexf/f2.html'?>
    <?php include_once __DIR__.'/../indexf/f3.html'?>
    <?php include_once __DIR__.'/../indexf/f4.html'?>
    <?php include_once __DIR__.'/../indexf/f5.html'?>
    <?php include_once __DIR__.'/../indexf/f6.html'?>

</div>
<div class="floor_anchor" style="display:none">
    <ul id="floor_id">
        <?php $num=0;?>
        <?php foreach($indexf['one_cat'] as $k=>$v):?>
        <li>
            <a href='javascript:;' class='shotitle'><?=$num=$num+1;?>F</a>
            <a href='javascript:;' class='distitle'><?=$v['0']['cat_title']?></a>
        </li>
        <?php endforeach;?>

    </ul>
</div>

<div class='Anchor'><i class='Anchor_svi' title='在线客服' style='display:none'></i> <i class='Anchor_top' title='返回顶部'
                                                                                    style='display:none'></i></div>
<script>
    $(function () {
        //页面滚动，锚链接显示
        $(window).scroll(function () {
            var Scroll = document.documentElement.scrollTop || document.body.scrollTop;
            var scrollVal = 500;
            if (Scroll >= scrollVal) {
                $('.Anchor_top').fadeIn(300);
            } else {
                $('.Anchor_top').fadeOut(300);
            }
        });
        $('.Anchor_top').click(function () {
            document.body.scrollTop = document.documentElement.scrollTop = 0;
            // $("body").animate({scrollTop:0},200);
        });
    });
</script>

<!--弹出层-->
<div id='alert' class='rewrite_alert' style='display:none'>
    <div class='Transparent_layer'></div>
    <div class='alert'>
        <div class='head'><span class='tit'>系统提示</span> <span class='CloseDialogBox' title='关闭'></span></div>
        <div class='body' id='Warnwrods'> Not Found Object!</div>
        <div class='down'><a href='javascript:;' onClick='' class='confirm' id='WarnConfrim'>确定</a> <a
                href='javascript:;' onClick='' class='cancel'>取消</a></div>
    </div>
</div>
<!--弹出层-->
</body>
</html>
<script type='text/javascript'>
    $(function () {
        if ('' != '') {
            warn('');
        }
        $('.cancel,.confirm,.CloseDialogBox').click(function () {
            $('.rewrite_alert').hide();
        });
        $(document).on('keydown', function (e) {
            if (e.keyCode == 13) {

            }
        })
    });
</script>

<script>
    $(function () {
//设置各级楼层主题色
        var floorThemeColor = [
            '#F4C600',
            '#EB4F38',
            '#9D55B8',
            '#0061B2',
            '#56ABE4',
            '#00BB9C',
            '#7CBA59',
            '#DD6572'
        ];
        var floorTrasnFont = [
            'Food and beverage',
            'Bedding home textiles',
            'Beauty care',
            'Digital accessories',
            'Living appliances',
            'Dress shoes',
            'Daily life'
        ];
        var getFloor = $('.main_floor');
        getColor = [], getFont = [];
        for (var i = 0; i < getFloor.length; i++) {
            getColor = floorThemeColor[i];
            getFont = floorTrasnFont[i];
            getFloorHead = getFloor.eq(i).children('.title');
            getFloorHead.css({"border-color": getColor})
            &&
            getFloorHead.find('h3').css({"color": getColor})
            &&
            getFloorHead.find('a').css({"color": getColor})
            &&
            getFloorHead.find('.trasn_font').text(getFont);
        }
//显示导航
        $("#GoodsMenuDiv").show();
//渐变大图
        banner('#fade_banner', {
            Type: 'fade',
            mainCell: '.fade_move',
            titCell: '.fade_sort',
            hasColor: true,
            speed: 5,
            prev: '.left',
            next: '.right',
            colorCell: '.fade_background'
        });
//滚动小图
        banner('.solid', {
            Type: 'move',
            mainCell: '.solid_main',
            titCell: '.sort_ul',
            hasColor: false,
            speed: 5,
            prev: '.solid_prev',
            next: '.solid_next'
        });
        $('#fade_banner').children('.content').hover(function () {
            $('.fade_switch').show();
            1
        }, function () {
            $('.fade_switch').hide();
        });
        FloorListen({parent: '#round', floorId: '#floor_id',});
        setWidhts();

        function setWidhts() {
            var getWindowWidth = $(window).width();
            var getDocument = $('.main_content').width();
            var posiWidth = $('.floor_anchor');
            var setWidth = parseInt(Math.floor(getWindowWidth - getDocument) / 2 - posiWidth.width());
            posiWidth.css({
                "left": setWidth - 10 + "px",
                "position": "fixed",
                "z-index": "110",
                "top": "0",
                "bottom": "0",
                "margin": "auto"
            })
        };
        $('#floor_id').children('li').hover(function () {
            $(this).addClass('hover');
        }, function () {
            $(this).removeClass('hover');
        });
        $(window).scroll(function () {
            if ($(window).scrollTop() >= $('.main_plates').get(0).offsetTop / 2) {
                $('.floor_anchor').fadeIn(300);
            } else {
                $('.floor_anchor').fadeOut(300);
            }
        })
        $(window).resize(function (e) {
            setWidhts()
        });
    });
    var FloorListen = function (a) {
        a = a || {};
        d = document;
        main = $(a.parent);
        getLayer = main.find("[floor]");
        length = getLayer.length;
        getfloorUl = $(a.floorId);
        getfloorUl.find("li:first").addClass('on');
        a = parseInt(getLayer.css("margin-top").replace(/px/, ""));
        var h = parseInt(getLayer.css("margin-bottom").replace(/px/, "")),
            k = parseInt(getLayer.css("padding-top").replace(/px/, "")),
            l = parseInt(getLayer.css("padding-bottom").replace(/px/, "")),
            e = a + h + k + l,
            f = $(window).height();
        var b = [];
        for (a = 0; a < length; a++) b[a] = Math.floor(getLayer.eq(a).get(0).offsetTop);
        var g = [];
        for (a = 0; a < length; a++) g[a] = Math.floor(b[a] - f / 2 + getLayer.height() / 2 - e);
        var c = 0;
        $(window).scroll(function () {
            for (var a = 0; a < length; a++) $(window).scrollTop() >= g[a] ? (c = a, getfloorUl.find("li").eq(c).addClass("on").siblings().removeClass("on")) : c = 0
        });
        getfloorUl.find("li").on("click", function () {
            thisId = $(this).index();
            var a = b[thisId] - f / 2 + getLayer.height() / 2 - e;
            $("html,body").animate({
                scrollTop: a
            }, 120)
        })
    }
</script>
